<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/jsp/common/include/taglibs.jsp"%>
<script type="text/javascript">

$(document).ready(function(){
	
});

//셀렉트 박스 변경
function frmChangeData(me){
	$("#rm_no").val($(me).val());
	$("#frmChange").submit();
}

//예약 취소
function sendData(){
	if($("input[name='idxs']").length==0){
		alert("취소할자료가 없습니다");
		return false;
	}
	
	if($("input[name='idxs']:checked").length==0){
		alert("취소할 객실을 선택해주세요");
		return false;
	}
	chkAllYn("");
	$("#frmdata").submit();
}

//모두 체크되었는지 여부 모두 체크되면 부가서비스도 체크함
function chkAllYn(initMode){
	
	if($("input[name='idxs2']").length>0){
		
		if($("input[name='idxs']").length == $("input[name='idxs']:checked").length){
			if('M'==initMode){
				alert("객실을 모두취소하면 부가서비스도 취소가 됩니다");	
			}
			$("input[name='idxs2']").attr("checked",true);
		}
	}
}
</script>
<c:set var="cancel_dt" value=""/>
<form action="./pere502Q.do" method="post" name="form1" id="frmdata">
<div style="display: none;">
<input name="p_id" value="${param.p_id }" type="hidden"/>
<input name="send_bank" value="${paramMap.send_bank }" type="hidden"/>
<input name="send_bank_nm" value="${paramMap.send_bank_nm }" type="hidden"/>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="10">
  <tr>
    <td>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="50%">&nbsp;</td>
          <td width="50%" align="right" style="padding-right: 30px;"></td>
        </tr>
      </table>

      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><span class="blueb">※</span><strong> 객실예약 확인</strong>
<c:if test="${reservationList !=null && fn:length(reservationList)>0 }">
	<select name="rm_no" onchange="frmChangeData(this);">
	<c:forEach var="map1" items="${reservationList}" varStatus="status">
		<option  <c:if test="${param.rm_no==map1.rm_no }">selected="selected" </c:if>value="${map1.rm_no }">${map1.reservation_nm }(${fn:substring(map1.reg_dt,2,4) }.${fn:substring(map1.reg_dt,4,6) }.${fn:substring(map1.reg_dt,6,8) })</option>
	</c:forEach>
	</select>
</c:if>

          </td>
        </tr>
        <tr>
          <td height="5"></td>
        </tr>
        <tr>
          <td>
<!-- 예약객실 목록 -->
<table width="100%" border="0" cellspacing="4" cellpadding="1"
	bgcolor="#edecec">
	<tr>
		<td bgcolor="#FFFFFF"><table width="100%" border="0"
				cellspacing="0" cellpadding="0">
				<tr align="center">
					<td width="10%" height="35" class="borderbg" bgcolor="#f5f5f5"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">객실명</td>
							</tr>
						</table></td>
					<td width="14%" bgcolor="#f5f5f5" class="borderlbg"><table
							width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr align="center">
								<td height="18" class="borderbg bold">이용일자</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#FFFFFF"></td>
							</tr>
							<tr align="center">
								<td height="16" class="bold">예약일자</td>
							</tr>
						</table></td>
					<td width="9%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">이용기간</td>
							</tr>
						</table></td>
					<td width="10%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">기준/예약</td>
							</tr>
						</table></td>
					<td width="13%" bgcolor="#f5f5f5" class="borderlbg"><table
							width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="18" colspan="2" class="borderbg" align="center"><table
										border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="bold" style="padding-top: 2px;">예약인원</td>
										</tr>
									</table></td>
							</tr>
							<tr>
								<td height="1" colspan="2" bgcolor="#FFFFFF"></td>
							</tr>
							<tr align="center">
								<td width="50%" height="16"><table border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="bold" style="padding-top: 2px;">성인</td>
										</tr>
									</table></td>
								<td width="50%" style="border-left-color: #c0c0bf;border-left-width: 1px;border-left-style: solid;"><table border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="bold" style="padding-top: 2px;">아동</td>
										</tr>
									</table></td>
							</tr>
						</table></td>
					<td width="11%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">기본요금</td>
							</tr>
						</table></td>
					<td width="11%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">추가요금</td>
							</tr>
						</table></td>
					<td width="10%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">할인요금</td>
							</tr>
						</table></td>
					<td width="12%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">합계</td>
							</tr>
						</table></td>
				</tr>
				<tr>
					<td height="1" colspan="9" bgcolor="#FFFFFF"></td>
				</tr>
				<c:set var="totalPayD1" value="0"/>
				<c:set var="addPay" value="0"/>
				<c:set var="totalPayD2" value="0"/>
<c:if test="${list !=null && fn:length(list)>0 }">
	<c:set var="room_nm_tmp" value=""/>
	<c:forEach var="map1" items="${list}" varStatus="status">

				<c:set var="totalPayD1" value="${totalPayD1 +map1.pay-map1.dc_pay }"/>
				<c:set var="addPay" value="${addPay +map1.pay_man_m }"/>
				<tr align="center">
<%-- 			<c:if test="${status.index==0 }"> --%>
<%-- 					<td height="30" bgcolor="#ffffff" class="borderbg" rowspan="${map1.rowspan }"><table --%>

						<td height="30" bgcolor="#ffffff" class="borderbg" ><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">
								
								<c:if test="${'Y'==map1.cancelYN }">
									<input name="idxs" value="${status.index }" type="checkbox" onclick="chkAllYn('M');" />
								</c:if>
								<c:if test="${'Y'!=map1.cancelYN }">
									<span style="display: none;">
									<input name="idxs" value="${status.index }" type="checkbox" onclick="chkAllYn('M');" />
									</span>
								</c:if>
									
									<input name="pr_nos" value="${map1.pr_no }" type="hidden"/>
									<input name="reservation_dts" value="${map1.reservation_dt }" type="hidden"/>
								</td>
								<td align="center" class="greenb2">${map1.room_nm } </td>
							</tr>
						</table></td>


<%-- 			</c:if> --%>

					<td bgcolor="#ffffff" class="borderlbg"><table width="100%"
							border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td align="center" class="greenb2">
<%-- 								${fn.substring(map1.nowdt,,4) } --%>

${fn:substring(map1.reservation_dt,2,4) }년
${fn:substring(map1.reservation_dt,4,6) }월
${fn:substring(map1.reservation_dt,6,8) }일
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#c0c0bf"></td>
							</tr>
							<tr>
								<td align="center" class="greenb2">
${fn:substring(map1.nowdt,0,4) }년
${fn:substring(map1.nowdt,4,6) }월
${fn:substring(map1.nowdt,6,8) }일
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">1박</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">${map1.use_man_cnt }/${map1.totalMan }</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table width="100%"
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="30" align="center" class="greenb2">
									<!--0-->
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="50%" height="30" align="center"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.man_cnt }명</td>
													</tr>
												</table></td>
											<td width="50%" align="center" class="borderlg"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.chi_cnt }명</td>
													</tr>
												</table></td>
										</tr>
									</table>
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.pay_man_m }" pattern="#,###"/>원
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.dc_pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><span id="total_price"><fmt:formatNumber value="${map1.total_pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
				</tr>
	</c:forEach>
</c:if>
<c:if test="${list ==null || fn:length(list)==0 }">
				<tr>
					<td colspan="10" style="text-align: center;height: 30px;">데이터가 없습니다</td>
				</tr>
</c:if>
			</table>
			</td>
	</tr>
</table>
<!-- 예약객실 목록 끝 -->

<!-- 취소객실 목록 -->
<c:if test="${cancelList !=null && fn:length(cancelList)>0 }">
        <tr>
          <td height="5"></td>
        </tr>
        <tr>
          <td><span class="blueb">※</span><strong>취소객실 목록</strong>
          </td>
        </tr>
        <tr>
          <td height="5"></td>
        </tr>
<table width="100%" border="0" cellspacing="4" cellpadding="1"
	bgcolor="#edecec">
	<tr>
		<td bgcolor="#FFFFFF"><table width="100%" border="0"
				cellspacing="0" cellpadding="0">
				<tr align="center">
					<td width="10%" height="35" class="borderbg" bgcolor="#f5f5f5"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">객실명</td>
							</tr>
						</table></td>
					<td width="14%" bgcolor="#f5f5f5" class="borderlbg"><table
							width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr align="center">
								<td height="18" class="borderbg bold">이용일자</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#FFFFFF"></td>
							</tr>
							<tr align="center">
								<td height="16" class="bold">예약일자</td>
							</tr>
						</table></td>
					<td width="9%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">이용기간</td>
							</tr>
						</table></td>
					<td width="10%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">기준/예약</td>
							</tr>
						</table></td>
					<td width="13%" bgcolor="#f5f5f5" class="borderlbg"><table
							width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="18" colspan="2" class="borderbg" align="center"><table
										border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="bold" style="padding-top: 2px;">예약인원</td>
										</tr>
									</table></td>
							</tr>
							<tr>
								<td height="1" colspan="2" bgcolor="#FFFFFF"></td>
							</tr>
							<tr align="center">
								<td width="50%" height="16"><table border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="bold" style="padding-top: 2px;">성인</td>
										</tr>
									</table></td>
								<td width="50%" style="border-left-color: #c0c0bf;border-left-width: 1px;border-left-style: solid;"><table border="0"
										cellspacing="0" cellpadding="0">
										<tr>
											<td align="center" class="bold" style="padding-top: 2px;">아동</td>
										</tr>
									</table></td>
							</tr>
						</table></td>
					<td width="11%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">기본요금</td>
							</tr>
						</table></td>
					<td width="11%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">추가요금</td>
							</tr>
						</table></td>
					<td width="10%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">할인요금</td>
							</tr>
						</table></td>
					<td width="12%" bgcolor="#f5f5f5" class="borderlbg"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="bold">합계</td>
							</tr>
						</table></td>
				</tr>
				<tr>
					<td height="1" colspan="9" bgcolor="#FFFFFF"></td>
				</tr>
<%-- 				<c:set var="totalPayD1" value="0"/> --%>
<%-- 				<c:set var="addPay" value="0"/> --%>
<%-- 				<c:set var="totalPayD2" value="0"/> --%>

	<c:set var="room_nm_tmp" value=""/>
	<c:forEach var="map1" items="${cancelList}" varStatus="status">

<%-- 				<c:set var="totalPayD1" value="${totalPayD1 +map1.pay-map1.dc_pay }"/> --%>
<%-- 				<c:set var="addPay" value="${addPay +map1.pay_man_m }"/> --%>
				<tr align="center">
<%-- 			<c:if test="${status.index==0 }"> --%>
<%-- 					<td height="30" bgcolor="#ffffff" class="borderbg" rowspan="${map1.rowspan }"><table --%>

						<td height="30" bgcolor="#ffffff" class="borderbg" ><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">
<%-- 									<input name="idxs" value="${status.index }" type="checkbox"/> --%>
<%-- 									<input name="pr_nos" value="${map1.pr_no }" type="hidden"/> --%>
<%-- 									<input name="reservation_dts" value="${map1.reservation_dt }" type="hidden"/> --%>
								</td>
								<td align="center" class="greenb2">${map1.room_nm } </td>
							</tr>
						</table></td>


<%-- 			</c:if> --%>

					<td bgcolor="#ffffff" class="borderlbg"><table width="100%"
							border="0" cellpadding="0" cellspacing="0">
							<tr>
								<td align="center" class="greenb2">
<c:if test="${status.index==0 }">
	<c:set var="cancel_dt" value="${fn:substring(map1.reg_dt,0,4)}년 ${fn:substring(map1.reg_dt,4,6) }월 ${fn:substring(map1.reg_dt,6,8) }일 ${fn:substring(map1.reg_dt,8,10) }시 ${fn:substring(map1.reg_dt,10,12) }분"/>
</c:if>

${fn:substring(map1.reservation_dt,2,4) }년
${fn:substring(map1.reservation_dt,4,6) }월
${fn:substring(map1.reservation_dt,6,8) }일
								</td>
							</tr>
							<tr>
								<td height="1" bgcolor="#c0c0bf"></td>
							</tr>
							<tr>
								<td align="center" class="greenb2">
${fn:substring(map1.nowdt,0,4) }년
${fn:substring(map1.nowdt,4,6) }월
${fn:substring(map1.nowdt,6,8) }일
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">1박</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">${map1.use_man_cnt }/${map1.totalMan }</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table width="100%"
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td height="30" align="center" class="greenb2">
									<!--0-->
									<table width="100%" border="0" cellspacing="0" cellpadding="0">
										<tr>
											<td width="50%" height="30" align="center"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.man_cnt }명</td>
													</tr>
												</table></td>
											<td width="50%" align="center" class="borderlg"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.chi_cnt }명</td>
													</tr>
												</table></td>
										</tr>
									</table>
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.pay_man_m }" pattern="#,###"/>원
								</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><fmt:formatNumber value="${map1.dc_pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
					<td bgcolor="#ffffff" class="borderlbg"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2"><span id="total_price"><fmt:formatNumber value="${map1.total_pay }" pattern="#,###"/>원</td>
							</tr>
						</table></td>
				</tr>
	</c:forEach>

			</table>
			</td>
	</tr>
</table>
</c:if>
<!-- 취소객실 목록 -->


<!-- 부가서비스 예약 -->
<c:if test="${rtAddSvcList !=null && fn:length(rtAddSvcList)>0 }">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td><span class="blueb">※</span><strong> 부가서비스 확인</strong></td>
				</tr>
				<tr>
					<td height="5"></td>
				</tr>
				<tr>
					<td><table width="100%" border="0" cellspacing="4"
							cellpadding="1" bgcolor="#edecec">
							<tr>
								<td bgcolor="#FFFFFF"><table width="100%" border="0"
										cellspacing="0" cellpadding="0">
										<tr align="center">
											<td width="17%" height="35" bgcolor="#4da6fa"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="bold">서비스명</td>
													</tr>
												</table></td>
											<td width="13%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="bold">주문수</td>
													</tr>
												</table></td>
											<td width="41%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="bold">요구사항</td>
													</tr>
												</table></td>
											<td width="13%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="bold">가격</td>
													</tr>
												</table></td>
											<td width="16%" bgcolor="#4da6fa" class="borderlw"><table
													border="0" cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="bold">합계</td>
													</tr>
												</table></td>
										</tr>
										<tr>
											<td height="1" colspan="5" bgcolor="#FFFFFF"></td>
										</tr>
	<c:forEach var="map1" items="${rtAddSvcList}" varStatus="status">
		<c:if test="${map1.as_status=='R'  || map1.as_status=='C'}">
		<c:set var="totalPayD2" value="${totalPayD2 +map1.totalPay }"/>
		</c:if>
			
										<tr align="center">
											<td height="30" bgcolor="#ffffff"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">
		<c:if test="${map1.as_status=='R' || map1.as_status=='C' }">
														<input name="idxs2" type="checkbox" value="${status.index }"/>
		</c:if>
														<input name="as_nos" value="${map1.as_no }" type="hidden"/>
														${map1.as_nm }
		<c:if test="${map1.as_status=='B' || map1.as_status=='D'  }">
		<br/>(취소처리)
		</c:if>
														</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.use_cnt }${map1.as_unit }</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2">${map1.reg_msg }</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2"><fmt:formatNumber value="${map1.as_pay }" pattern="#,###"/>원</td>
													</tr>
												</table></td>
											<td bgcolor="#ffffff" class="borderlg"><table border="0"
													cellspacing="0" cellpadding="0">
													<tr>
														<td align="center" class="greenb2"><fmt:formatNumber value="${map1.totalPay }" pattern="#,###"/>원</td>
													</tr>
												</table></td>
										</tr>
	</c:forEach>
									</table></td>
							</tr>
						</table></td>
				</tr>
			</table>
</c:if>          
<!-- 부가서비스 예약 끝 -->
          </td>
        </tr>
      </table>
<!-- rtAddSvcList -->
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><table width="100%" border="0" cellspacing="4" cellpadding="1" bgcolor="#edecec">
              <tr>
                <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr align="center">
                      <td width="62%" height="35" bgcolor="#f5f5f5"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="dgrayb">구분</td>
                          </tr>
                        </table></td>
                      <td width="38%" bgcolor="#f5f5f5" class="borderlb"><table border="0" cellpadding="0" cellspacing="0">
                          <tr>
                            <td align="center" class="dgrayb">금액</td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr>
                      <td height="1" colspan="2" bgcolor="#C0C0BF"></td>
                    </tr>
                    <tr align="center">
                      <td height="30" bgcolor="#ffffff" class="borderbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">객실기본요금합계</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2"><fmt:formatNumber value="${totalPayD1 }" pattern="#,###"/>원 </td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr align="center">
                      <td height="30" bgcolor="#ffffff" class="borderbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">추가요금합계</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2"><fmt:formatNumber value="${addPay }" pattern="#,###"/>원</td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr align="center">
                      <td height="30" bgcolor="#ffffff" class="borderbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">부가서비스요금 합계</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlbg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="blueb"><span class="greenb2"><fmt:formatNumber value="${totalPayD2 }" pattern="#,###"/>원</span></td>
                          </tr>
                        </table></td>
                    </tr>
										<span style="display:none">
					<input name="usepoint" type="text" id="usepoint">
					<input type="checkbox" name="checkAllpoint" id="checkAllpoint" onclick="this.form.usepoint.value=mypoint">
					</span>
					                    <tr align="center">
                      <td height="30" bgcolor="#ffffff"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="greenb2">결제금액</td>
                          </tr>
                        </table></td>
                      <td bgcolor="#ffffff" class="borderlg"><table border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align="center" class="redb"><span id="total_payprice"><fmt:formatNumber value="${totalPayD1+addPay+totalPayD2 }" pattern="#,###"/></span>원</td>
                          </tr>
                        </table></td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
        </tr>
      </table>
      
<!-- 예약자 무통장 입금 -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="10" height="20" align="right" valign="top"><table
							width="5" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td bgcolor="#60C930" height="10"></td>
							</tr>
						</table></td>
					<td valign="bottom" class="padl5"><strong>예약자 정보</strong></td>
				</tr>
			</table></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td><table width="100%" border="0" cellpadding="0"
				cellspacing="1" bgcolor="#d8d8d8">
				<tr>
					<td width="130" height="3" bgcolor="#60c930"></td>
					<td></td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">예약자명</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.reservation_nm }</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">휴대폰</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.r_phone1 }-${paramMap.r_phone2 }-${paramMap.r_phone3 }</td>
				</tr>
				<tr style="display: none;">
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">픽업요청</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">픽업장소:
						${paramMap.pickup }&nbsp;&nbsp;&nbsp;픽업시간: ${paramMap.pick_info }</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">펜션도착시간</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.end_time } 
						<c:if test="${paramMap.pickup_yn=='Y' }">픽업요청함</c:if>
						<c:if test="${paramMap.pickup_yn!='Y' }"></c:if>
					</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">E - MAIL</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">
						<c:if test="${(''!=paramMap.r_email2 && ''!=paramMap.r_email1) }">
						${paramMap.r_email1 }@${paramMap.r_email2 }
						</c:if>
					</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">출발지역</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.start_area }</td>
				</tr>
				<tr>
					<td height="60" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">기타요청사항</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.etc_req }</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">결제방법</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30"><table border="0"
							cellspacing="0" cellpadding="0">
							<tr>
								<td>BANK
									<c:if test="${paramMap.pay_type=='' }"></c:if>
									<c:if test="${paramMap.pay_type=='' }"></c:if>
<%-- 									<c:if test="${paramMap.pay_type=='' }"></c:if> --%>
								</td>
							</tr>
						</table></td>
				</tr>
			</table></td>
	</tr>
</table>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
	<tr>
		<td>&nbsp;</td>
	</tr>
	<tr>
		<td><table border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td width="10" height="20" align="right" valign="top"><table
							width="5" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td bgcolor="#0099FF" height="10"></td>
							</tr>
						</table></td>
					<td valign="bottom" class="padl5"><strong>무통장 입금</strong></td>
				</tr>
			</table></td>
	</tr>
	<tr>
		<td height="5"></td>
	</tr>
	<tr>
		<td><table width="100%" border="0" cellpadding="0"
				cellspacing="1" bgcolor="#d8d8d8">
				<tr>
					<td width="130" height="3" bgcolor="#0099FF"></td>
					<td></td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">입금은행</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.send_bank }</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">입금자명</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">${paramMap.send_bank_nm }</td>
				</tr>
				<tr>
					<td height="30" align="center" bgcolor="#ffffff"><table
							border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td align="center" class="greenb2">입금대기시간</td>
							</tr>
						</table></td>
					<td bgcolor="#FFFFFF" class="padl30">
		                <c:if test="${list !=null && fn:length(list)>0 }">
							- 
								${fn:substring(list[0].rm_wait_time,0,4) }년
								${fn:substring(list[0].rm_wait_time,4,6) }월
								${fn:substring(list[0].rm_wait_time,6,8) }일
								
								${fn:substring(list[0].rm_wait_time,8,10) }시
								${fn:substring(list[0].rm_wait_time,10,12) }분
							 (시간내
								입금이 되지 않으면 자동으로 <span class="redb">예약취소</span> 됩니다)
		                </c:if>
		                <c:if test="${list ==null || fn:length(list)==0 }">
		                	취소시간 : ${cancel_dt }
		                </c:if>
		                
					</td>
				</tr>
			</table></td>
	</tr>
</table>

<!-- 예약자 무통장 입금 끝 -->
      
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td align="center"><table width="100" border="0" cellspacing="0" cellpadding="2">
              <tr>
                <td>
<c:if test="${!cancelBtn }">
	                <c:if test="${list !=null && fn:length(list)>0 }">
	                	<a href="#" onclick="sendData();"><img src="/camping/img/reservation_bt03.jpg" width="114" height="36"></a>
	                </c:if>
</c:if>

                </td>
                <td>
                	<a href="./pere100Q.do?p_id=${param.p_id }" ><img src="/camping/img/reservation_bt05.jpg" width="114" height="36"></a>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr>
          <td align="center">&nbsp;</td>
        </tr>
        <tr>
          <td height="3" bgcolor="#86ad29"></td>
        </tr>
        <tr>
          <td style="padding-top: 2px;"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td valign="top"><a href="javascript:partner_login('haebichi')"><img src="/usr/images/res_btn_partners.gif" width="73" height="21"></a></td>
                <td align="right">Comodo SSL 보안서버 적용 사이트입니다<br>
                  ⓒ 실시간 예약프로그램은 www.pensiontrip.com 에서 제공 합니다</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
</table>

</form>

<form action="./pere501Q.do" method="post" name="form1" id="frmChange">
	<input name="p_id" value="${param.p_id }" type="hidden"/>
	<input name="rm_no" id="rm_no" value="" type="hidden"/>
	<input name="r_phone1" value="${param.r_phone1}" type="hidden"/>
	<input name="r_phone2" value="${param.r_phone2}" type="hidden"/>
	<input name="r_phone3" value="${param.r_phone3}" type="hidden"/>
	<input name="reservation_nm" value="${param.reservation_nm }" type="hidden"/>
</form>
